/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  Image,
  View
} from 'react-native';

export default class AwesomeProject extends Component {
  render() {
    // return (
    //   <View style={styles.container}>
    //     <Text style={styles.welcome}>
    //       Welcome to React Native!
    //     </Text>

    //     <Text style={styles.instructions}>
    //       To get started, edit index.android.js
    //     </Text>

    //     <Text style={styles.instructions}>
    //       Double tap R on your keyboard to reload,{'\n'}
    //       Shake or press menu button for dev menu
    //     </Text>
    //   </View>
    // );


    //加载图片
    /*let pic = {
      uri: 'http://static10.photo.sina.com.cn/middle/5a3ab1b1x9961016a8699&690'
    };
    return (
      <Image source={pic} style={{width: 193, height: 110}}/>
    );*/


    //样式
    return(
        <View>
            <Text style={styles.red}>just red</Text>
            <Text style={styles.bigBlue}>just bigBlue</Text>
            <Text style={[styles.bigBlue,styles.red]}>bigBlue,then red</Text>
            <Text style={[styles.red,styles.bigBlue]}>red,then bigBlue</Text>
        </View>
      );
  }
}


const styles = StyleSheet.create({
  bigBlue:{
    color:'blue',
    fontSize:30,
    fontWeight:'bold',
  },
  red:{
    color:'red',
  },
});

/*const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});*/

AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);

